﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace _3DTiroAoAlvo
{
   public abstract class Camera
    {
      
           public Matrix View { get; set; } // campo de visão
           public Matrix Projection { get; set; }
           protected GraphicsDevice GraphicsDevice { get; set; }

           public Camera(GraphicsDevice graphicsDevice)
           {
               this.GraphicsDevice = graphicsDevice;
               generatePerspectiveProjectionMatrix(MathHelper.PiOver4);// ?
           }

           private void generatePerspectiveProjectionMatrix(float FieldOfView)// coloca a câmera em perspectiva?
           {
               PresentationParameters pp = GraphicsDevice.PresentationParameters;
               float aspectRatio = (float)pp.BackBufferWidth / (float)pp.BackBufferHeight; // define a proporção da tela para a camera
               this.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45), aspectRatio, 0.1f, 100000.0f);
           }

           public virtual void Update()
           {
           }


       
    }
}
